package cn.edu.zafu.bigdata.lwg;

import java.util.HashMap;

class StudentGradeManager {
    private HashMap<String, Integer> studentGrades;

    public StudentGradeManager() {
        studentGrades = new HashMap<>();
    }

    public void addStudent(String name, int grade) {
        studentGrades.put(name, grade);
    }

    public int getGrade(String name) {
        return studentGrades.getOrDefault(name, -1);
    }

    public void removeStudent(String name) {
        studentGrades.remove(name);
    }
}

public class TestStudentGradeManager {
    public static void main(String[] args) {
        StudentGradeManager manager = new StudentGradeManager();

        manager.addStudent("张三", 90);
        manager.addStudent("李四", 85);
        manager.addStudent("王二", 95);

        System.out.println("张三的成绩: " + manager.getGrade("张三"));
        System.out.println("李四的成绩: " + manager.getGrade("李四"));
        System.out.println("王二的成绩: " + manager.getGrade("王二"));
        System.out.println("橙子的成绩: " + manager.getGrade("橙子"));

        manager.removeStudent("李四");
        System.out.println("李四的成绩被删除后: " + manager.getGrade("李四"));
    }
}